package com.patterns.chain;

/**
 * 领导：经理
 * @author huangke
 *
 */
public class ManagerLeader extends Leader{

	public ManagerLeader(String name) {
		super(name);
	}

	@Override
	public void handleRequest(LeaveRequest r) {
		if (r.getDays() <= 5) {
			System.out.println(this.name+":请假不超过5天，经理批准");
		}else{
			if(this.nextLeader != null){
				System.out.println(this.name+":请假超过5天，由总经理审批");
				this.nextLeader.handleRequest(r);
			}
		}
	}

}
